import { createStore } from 'vuex'

export default createStore({
  state: {
    nickname:'',//登录用户名
    cartCount:0,//收藏夹
  },
  mutations: {
    saveUserInfo(state,nickname){
      state.nickname = nickname;
    }
  },
  actions: {
    saveUserInfo(context,nickname){
      context.commit('saveUserInfo',nickname);
    }
  },
  modules: {
 
  }
})
